package com.kangye.learnteacher.mapper;

import com.kangye.learnteacher.entity.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Mapper
@Repository
public interface CorrectionMapper {
    /**
     * 查询学科
     * @param SubjectId
     * @return
     */
    List<Subject> getSubjectId(@Param("subjectId") Integer SubjectId);

    /**
     * 查询班级
     * @param classesId
     * @return
     */
    List<Classes> getClasses(@Param("classesId") Integer classesId);

    /**
     * 查询试卷列表
     * @param classesId
     * @param subjectId
     * @return
     */
    List<Map<String, Object>> getStudentParper(@Param("gradeId") Integer gradeId,@Param("classesId") Integer classesId, @Param("subjectId") Integer subjectId,@Param("spCorrectStatus")Integer spCorrectStatus);

    /**
     * 查询年级
     * @return
     */
    List<Grade> getGrade();

    /**
     * 获取需要批改的试卷
     * @param paperId
     * @return
     */
    List<Map<String, Object>> getPaper(@Param("paperId")Integer paperId,@Param("spCorrectStatus")Integer spCorrectStatus);

    /**
     * 判分
     * @param score
     * @param spid
     * @return
     */
    Integer shenpi(@Param("score")Integer score,@Param("spid")Integer spid);
}
